/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package client;

import commom.Network;
import commom.VirtualMachine;
import java.util.ArrayList;
import java.util.UUID;


/**
 *
 * @author gravena
 */
public class Main {
    public static void main(String args[]) {
        ArrayList<VirtualMachine> vms = new ArrayList<>();
        ArrayList<TestSlave> test = new ArrayList<>();

        /* Every client has this virtual machine that isn't really a VM, is just a shortcut to execute the test from the local machine itself */
        vms.add(new VirtualMachine("127.0.0.1", Network.DEFAULT_PORT_VM, "127.0.0.1" + System.nanoTime(), true, true));                
        byte[] addr = new byte[4];
        addr[0] = 127;
        addr[1] = 0;
        addr[2] = 0;
        addr[3] = 1;
        
        UUID temp = UUID.nameUUIDFromBytes(addr);
        vms.get(0).setUUID(temp);        
        
//        Network.sendDiscover();

        new Thread(new ConnectionListener(vms,test)).start();
    }
}

